<?php 
/** 展示活动自助管理  **/
function hidtel($phone){
         return  preg_replace('/(1[34578]{1}[0-9])[0-9]{4}([0-9]{4})/i','$1****$2',$phone);
 } 
//截取utf8字符串 
function utf8Substr($str, $from, $len) 
{  
return preg_replace('#^(?:[\x00-\x7F]|[\xC0-\xFF][\x80-\xBF]+){0,'.$from.'}'. 
'((?:[\x00-\x7F]|[\xC0-\xFF][\x80-\xBF]+){0,'.$len.'}).*#s', 
'$1',$str); 
} 

?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
    <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
    <meta content="width=device-width, initial-scale=1.0, minimum-scale=1.0, maximum-scale=1.0,user-scalable=no" name="viewport" id="viewport" />
    <meta name="apple-mobile-web-app-capable" content="yes" />
    <meta name="apple-mobile-web-app-status-bar-style" content="black" />
    <title><?php echo $news['title']; ?></title>
    <meta name="description" content="微信模板" />
    <meta name="keywords" content="" /> 
    <link href="__PUBLIC__/styles/default/css/base.css" type="text/css" rel="stylesheet" />
    <link href="__PUBLIC__/styles/default/css/zlcomm.css?v=00" type="text/css" rel="stylesheet" />
    <script type="text/javascript" src="__PUBLIC__/styles/default/js/jquery-1.8.0.min.js" charset="utf-8"></script>
    <script type="text/javascript" src="__PUBLIC__/styles/default/js/scroll.js" charset="utf-8"></script>
      
<script src="http://res.wx.qq.com/open/js/jweixin-1.0.0.js"></script>
<script>
  wx.config({
    debug: false,
    appId: '{$signPackage["appId"]}',
    timestamp: '{$signPackage["timestamp"]}',
    nonceStr: '{$signPackage["nonceStr"]}',
    signature: '{$signPackage["signature"]}',
    jsApiList: [
      // 所有要调用的 API 都要加到这个列表中
      'onMenuShareTimeline','onMenuShareAppMessage'
    ]
  });
  wx.ready(function () {
    // 在这里调用 API
 
    wx.onMenuShareTimeline({
      title: "{$news['title']}",// 分享标题
	  link: "http://www.dscm.com.cn/xcrm/index.php?m=Wap&c=Show&a=index&hdid={$hdid}", // 分享链接
      desc: "{$news['xxsm']}", // 分享描述
      imgUrl: "http://www.dscm.com.cn{$news.style.fx}", // 分享图标
      trigger: function () {
          //alert("点击分享：");
      },
      success: function () { 
          // 用户确认分享后执行的回调函数
          //alert("分享成功");
      },
      cancel: function () { 
          // 用户取消分享后执行的回调函数
          //alert("用户取消分享");
      }
    });
  
  	wx.onMenuShareAppMessage({
      title: "{$news['title']}",// 分享标题
	  link: "http://www.dscm.com.cn/xcrm/index.php?m=Wap&c=Show&a=index&hdid={$hdid}", // 分享链接
      desc: "{$news['xxsm']}", // 分享描述
      	imgUrl: "http://www.dscm.com.cn{$news.style.fx}", // 分享图标
    	type: 'link', // 分享类型,music、video或link，不填默认为link
		success: function () { 
			// 用户确认分享后执行的回调函数  
		},
		cancel: function () { 
			// 用户取消分享后执行的回调函数
		}
	 });
  });
</script>
</head>
<body> 

    <div id="all">  
    	<div class="header1">
		 	<?php 
			foreach($news['style']['top'] as $val)
			{
				echo "<img src='$val' width='100%' />";
			}
			?>
        </div>


		
		<?php 
			foreach($news['style']['end'] as $val)
			{
				echo "<img src='$val' width='100%' />";
			}
		?>


    </div> 

</body>
</html>